<script type="text/javascript" language="javascript">
    (function($) {
        /*whatever jQuery stuff*/
        $(function(){				
            $("#Form").validate({
                rules: {
                    mainmenu_id: "required",
                    sub_name: "required",
					plan: "required"
                },
                showErrors: function(errorMap, errorList){
                    var messages='';
                    for (var i = 0; i < errorList.length; i++) {					
                        messages += '- '+errorList[i].message+'\n';
                    }
                    if(messages) alert("<?php echo lang('requirement');?>: \n"+"¯¯¯¯¯¯¯¯¯¯ \n"+ messages);
                    //this.defaultShowErrors();
                } ,
                submitHandler: function(e){
					$('.ajax-loading',e).css('visibility','visible');
					form.submit();
                },
                onfocusout: false,
                onkeyup: false,						
                onclick: false,						
                messages: {
                    mainmenu_id: "<?php echo lang('main_name');?>",
                    sub_name: "<?php echo lang('sub_name');?>",
					plan: "Plan"
                }
            });			
        });
    })(jQuery);
</script>
<div class="wrap">
 	<div id="icon-index" class="icon32"><br /></div><h2><?php echo ucwords(str_replace('_',' ',$this->uri->segment(1)));?> &raquo; <?php echo ucwords(str_replace('_',' ',$this->uri->segment(2)));?> &raquo; <?php echo lang($this->uri->segment(3));?></h2>
</div>
<div id="wpbody-content">
    <div class="metabox-holder" id="dashboard-widgets">
		<div class="tablenav top">
			<div class="alignleft"><input type="button" value="<?php echo lang('button_back');?>" class="button-primary" onclick="javascript:history.go(-1);"/></div>
		</div>	
            <div class="inside">			
				<form id="Form" method="post" action="" name="Form">
					<table border="0" cellspacing="0" cellpadding="0" class="form-table">
						<tbody>	
						<tr>
							<th scope="row"><?php echo lang('main_name');?></th>
							<td>
								<?php echo $dataMainMenu->main_name;?>
								<input type="hidden" name="mainmenu_id" id="mainmenu_id" value="<?php echo $this->input->get('mainmenu_id');?>"/>
							</td>
						</tr>										
						<tr>
							<th scope="row"><?php echo lang('sub_name');?></th>
							<td><input type="text" name="sub_name" id="sub_name" class="regular-text" /></td>
						</tr>	
						<tr>
							<th scope="row"><?php echo lang('status');?></th>
							<td>
								<input type="radio" name="status" id="status" checked="checked" value="1"/> <?php echo lang('status_open');?>
								<input type="radio" name="status" id="status" value="0"/> <?php echo lang('status_close');?>
							</td>
						</tr>															
						<tr>
							<th scope="row">&nbsp;</th>
							<td><p class="submit"><input type="submit" value="<?php echo lang('button_add');?>" class="button-primary" />&nbsp;<img alt="" class="ajax-loading" src="<?php echo css_asset_url('images/wpspin_light.gif'); ?>" /></p></td>
						</tr>								
						</tbody>
					</table>
					<div class="tablenav bottom"></div>
				</form>
            </div><!-- wpbody inside -->
    </div><!-- wpcontent -->
</div><!-- wpbody-content -->